<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/sys/main.js';
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){
		}
	});
});
$('#time1').datepicker({format: 'yyyy-mm-dd'});
$('#time2').datepicker({format: 'yyyy-mm-dd'});
$('#editUserSelfDiv').tabs();
$('#editUserForm').find("input:checkbox, input:radio").not('input.ibtn').uniform();
</script>
<#import "/freemarker/modeltype.ftl" as mt>
<#import "/freemarker/modeltype_entity.ftl" as mte>
<div id="editUserSelfDiv" style="width:600px;">
	<ul>
		<li><a href="#tabs-1">个人资料</a></li>
		<li><a href="#tabs-2">修改密码</a></li>
	</ul>
	<div id="tabs-1">
		<form id="editUserForm">
			<table style="width:400px;">
				<tr height="40">
					<td style="width: 100px;">姓名</td>
					<td><input id="name" class="field" type="text" name="name" value="${(user.name)!''}"/></td>
				</tr>
				<tr height="40">
					<td>邮箱</td>
					<td><input id="email" class="field" type="text" name="email" value="${(user.email)!''}" readonly="readonly"/></td>
				</tr>
				<tr height="40">
					<td>性别</td>
					<td><@mt.ManOrFemale value=((user.sex)!false) r=true name='sex' d=false mc=false /></td>
				</tr>
				<tr height="40">
					<td>QQ</td>
					<td><input id="qq" class="field" type="text" name="qq" value="${(user.qq)!''}"/></td>
				</tr>
				<tr height="40">
					<td>电话</td>
					<td><input id="mobile" class="field" type="text" name="mobile" value="${(user.mobile)!''}"/></td>
				</tr>
				<tr height="40">
					<td>生日</td>
					<td><input id="birthday" class="field" type="text" name="birthday" value="${(user.birthday)!''}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/></td>
				</tr>
				<tr height="40">
					<td>入职时间1</td>
					<td><input id=entryTime class="field" type="text" name="entryTime" value="${(user.entryTime)!''}" <#if user.entryTime??>readonly="readonly"<#else>onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"</#if>/></td>
				</tr>
				<tr height="40">
					
					<td>职位变动</td>
					<td><#assign i = 1 /><#if (post?? && post?size gt 0)><#list post as p><font>${(p.rn)!'没有角色！'}<#if post?size != i>>>></#if></font><#assign i = i + 1/></#list></#if></td>
					
				</tr>
				<tr height="40">
					<td colspan="2" style="text-align: center;">
						<button class="btn btn-info" data-dismiss="modal"  onclick="javascript: main_saveUserSelf(); return false;"><i class="icon-save"></i> 保存</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<button class="btn btn-primary" data-dismiss="modal"  onclick="javascript: sys_load_default(); return false;">返回默认页面</button>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div id="tabs-2">
		<form id="editPassForm">
		<table style="width:400px;">
			<tr height="40">
				<td style="width: 100px;">旧密码</td>
				<td><input type="password" id="oldpwd" name="oldpwd" class="form-control"/></td>
			</tr>
			<tr height="40">
				<td>请输入新密码</td>
				<td><input type="password" id="newpwd" name="newpwd" class="form-control"/></td>
			</tr>
			<tr height="40">
				<td>请再次输入新密码</td>
				<td><input type="password" id="pwd2" name="pwd2" class="form-control"/></td>
			</tr>
			<tr height="40">
					<td colspan="2" style="text-align: center;">
						<button class="btn btn-info" data-dismiss="modal" onclick="javascript: main_isPwd($('#oldpwd').val(),$('#newpwd').val(),$('#pwd2').val()); return false;">
						<i class="icon-save"></i> 保存</button>
						<button class="btn btn-primary" data-dismiss="modal" onclick="javascript: sys_load_default(); return false;">返回默认页面</button>
					</td>
				</tr>
		</form>
	</div>
</div>



